package com.biz.primus.ms.commodity.dao.po;

import com.biz.primus.ms.base.jpa.po.BaseEntity;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

@Data
@Entity
@Table(name = "pro_commodity_spec",
        uniqueConstraints = {@UniqueConstraint(columnNames = {"productCode", "packageId"})},
        indexes = {@Index(columnList = "barCode")})
public class CommoditySpec extends BaseEntity implements Serializable {

    /**
     * 商品编码
     */
    @Column(length = 20, nullable = false)
    private String productCode;

    /**
     * 包装序列号
     */
    @Column
    private Integer packageId;

    /**
     * 多条码
     */
    @Column(length = 50, unique = true)
    private String barCode;

    /**
     * 规格名称
     */
    @Column(length = 40)
    private String specName;

    /**
     * 包装规格( nn*nn)
     */
    @Column(length = 20)
    private String packageSpec;

    /**
     * 件装数
     */
    @Column(nullable = false)
    private Integer packageNumber;


    /**
     * 包装重量
     */
    @Column
    private Integer packageWeight;

    /**
     * 产地
     */
    @Column(length = 20)
    private String producingArea;


    /**
     * 陈列规格（深）
     */
    @Column
    private Integer specL;

    /**
     * 陈列规格（宽）
     */
    @Column
    private Integer specW;

    /**
     * 陈列规格（高）
     */
    @Column
    private Integer specH;

    /**
     * 是否是App端实际使用的箱规
     */
    @Column
    private Boolean truePackage;
}
